/**
 * @file   1059.cpp
 * @author Shuang Hu <hsmath@ubuntu>
 * @date   Sat May 29 20:23:29 2021
 * 
 * @brief  PAT 1059:Prime
 * 
 * 
 */
#include<iostream>
#include<cmath>
#include<vector>
#include<map>
using namespace std;
bool isprime(long int d){
    for(long int i=2;i<=sqrt(d);i++){
	if(d%i==0){
	    return false;
	}
    }
    return true;
}
int main(){
    long int N;
    cin>>N;
    cout<<N<<"=";
    map<long int,int> factorize;
    int i=2;
    if(N==1){
	cout<<"1"<<endl;
	return 0;
    }
    while(isprime(N)==false){
	while(N%i==0){
	    factorize[i]++;
	    N/=i;
	}
	i++;
    }
    if(N!=1){
	factorize[N]++;
    }
    cout<<factorize.begin()->first;
    if(factorize.begin()->second!=1){
	cout<<"^"<<factorize.begin()->second;
    }
    for(auto it=factorize.begin();it!=factorize.end();it++){
	if(it!=factorize.begin()){
	    cout<<"*"<<it->first;
	    if(it->second!=1){
		cout<<"^"<<it->second;
	    }
	}
    }
    cout<<endl;
}
